package cn.iocoder.yudao.module.system.controller.admin.user.vo.user;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

@Schema(description = "管理后台 - 用户同步 Request VO")
@Data
public class UserSyncReqVO {

    @Schema(description = "用户数据列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "用户数据列表不能为空")
    @Valid
    private List<UserSyncDataVO> data;

    @Schema(description = "用户同步数据 VO")
    @Data
    public static class UserSyncDataVO {

        @Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
        @NotNull(message = "部门ID不能为空")
        private Long deptId;

        @Schema(description = "账号", example = "005020955")
        private String userName;

        @Schema(description = "姓名", example = "白雯雯")
        private String realName;

        @Schema(description = "性别", example = "1")
        private Integer sex;

        @Schema(description = "头像", example = "http://example.com/avatar.jpg")
        private String photo;

        @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
        @NotNull(message = "排序不能为空")
        private Integer dispOrder;

        @Schema(description = "停用状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
        @NotNull(message = "停用状态不能为空")
        private String status;

        @Schema(description = "删除状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
        @NotNull(message = "删除状态不能为空")
        private String delFlag;
    }
}